package com.hntx.joymusic.bus;

import io.reactivex.Observer;
import io.reactivex.annotations.NonNull;
import io.reactivex.disposables.Disposable;

/**
 * Created by Administrator on 2017/9/27.
 */

public class RxBuses {
    private static final String collectionError = "collectionError";

    public static RxBus getCollectionBus() {
        return RxBus.getInstance(collectionError);
    }

    public static void LogCollectionErrorInfo() {
        RxBus rxBus = getCollectionBus();
        rxBus.toObservable().
                map(o -> (String) o).
                subscribe(new Observer<String>() {

            @Override
            public void onSubscribe(@NonNull Disposable d) {
            }

            @Override
            public void onNext(@NonNull String s) {
            }

            @Override
            public void onError(@NonNull Throwable e) {
            }

            @Override
            public void onComplete() {
            }
        });
    }
}
